using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Crm;

/// <summary>
/// 项目管理产品
/// </summary>
[SugarTable("crm_project_product")]
public class CrmProjectProduct:Entity
{
    /// <summary>
    /// 归属项目
    /// </summary>
    [Required]
    public long ProjectId { get; set; }

    /// <summary>
    /// 产品唯一
    /// </summary>
    [Required]
    public long ProductId { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Number { get; set; }

    /// <summary>
    /// 产品名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 产品单位
    /// </summary>
    public string Unit { get; set; }

    /// <summary>
    /// 产品金额
    /// </summary>
    public decimal Amount { get; set; }

    /// <summary>
    /// 产品数量
    /// </summary>
    [Required]
    public int Num { get; set; } = 0;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}